package com.projectw.common.result;

/**
 * Created by Peter_Wang on 2018/8/20.
 */
public class ResultMapper {
    /**
     * 调用成功
     */
    public static final String MARK_SUCCSSS = "0";
    /**
     * 调用失败
     */
    public static final String MARK_FAILED = "1";
    /**
     * 验证码不正确失败
     */
    public static final String MARK_CAPTCHA_FAILED = "1";

    private String mark;
    private String message;
    private Object sys;
    private Object data;

    /**
     * 调用成功 true
     * @return
     */
    public boolean isSuccess(){
        return mark != null && mark.endsWith(MARK_SUCCSSS);
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Object getSys() {
        return sys;
    }

    public void setSys(Object sys) {
        this.sys = sys;
    }
}
